This invention relates to the control of chained data transfers between input/output devices and main memory in a data processing system and more particularly to the suspension and resumption of such chained data transfers between I/O devices and a computer memory.
Modern computer systems include data channels which control the movement of data between input/output devices and main storage for the computer. Channels relieve the central processing unit (CPU) of directly controlling the I/O devices and permit data processing to proceed concurrently with input/output operations. As described in the manual entitled "IBM System 370 System Principles of Operation" Fourth Edition, published by IBM Corporation in September 1974, an IBM system/370 central processing unit (CPU) initiates operations between input/output devices and main storage for such a system by means of a Start I/O instruction. This instruction addresses a particular channel and an I/O device. In response to the instruction, the channel fetches a channel address word (CAW) from a fixed location in main storage. The CAW specifies the storage protection key and the address of the first channel command word (CCW) associated with the Start I/O. A CCW specifies the command to be executed and, for commands initiating I/O operations, it designates the storage area associated with the operation. The channel interprets the command in the CCW and takes over its execution. At the completion of the execution, the channel issues an interrupt to the CPU and provides information in the form of a channel status word (CSW) describing the results of executing the I/O operation.
In many applications, it is necessary to perform a plurality of CCWs in sequence. To avoid the requirement of issuing a start I/O and an interruption for each CCW in the sequence, a procedure called chaining can be used. Flags contained in each CCW specify when chaining is to occur. When chaining is performed, after the transfer of information specified in the first CCW, a second CCW is fetched without the intervention of an interrupt followed by a second Start I/O instruction.
Chaining usually takes place between CCWs located in successive locations in storage. It proceeds in ascending order of storage address with the address of a new CCW obtained by adding 8 to the address of the current CCW. However, CCWs located in non-continuous storage areas can also be coupled together for chaining purposes by use of a linking CCW which specifies a command which is called a transfer in command and contains the address of the non-continuous CCW in its address field.
Two types of chaining are provided, chaining of data and chaining of commands. The chaining of data locations in storage is indicated by setting the chain data (CD) flag to 1, while the chaining of various CCW commands is established by setting the chain command (CC) flag to 1. What we are concerned with here is command chaining.
Once a channel has initiated a command chaining operation, the channel is dedicated to the device and that operation until completed. At times it becomes desirable to interrupt the chaining without ending the dedication of the I/O device to the chaining function.
A way of interrupting chaining is to use a CCW calling for a transfer in channel command and specifying the address of the previously executed CCW in its address field. The problem with this approach is it ties up the channel and subchannel during the suspension while repetitively executing the last and the next to last CCWs.
Another approach to interrupting chaining is the suspension and resumption of chained CCWs as seen in U.S. Pat. No. 3,728,693. With this approach, the device interrupts the chain but must periodically re-establish connections with the channel to determine if the program should be resumed. As a result, the channel is not available to work with other devices attached to the channel during the suspended operation.
In U.S. Pat. No. 3,898,623 a channel with the capability of suspending and resuming execution of chained commands with devices is described. The scheme described in this patent permits the channel to execute operations involving other devices while a device is suspended.